// 引入koa-router
const Router = require('koa-router')
// 引入用户模块子路由
const userRouter = require('./userRouter/user.router')
// 引入上传图片
const avatarUpload = require('./upload/upload.router')
// 引入用户管理层
const userManage = require('./userRouter/userManage.router')
// 引入博客管理路由
const blogRouter = require('./blogs/blog.router')
// 引入分类路由
const categorizeRouter = require('./categorizes/categorizes.router')
// 引入可视化数据路由
const dataEchartsRouter = require('./dataEcharts/dataEcahrts.router')
// 引入评论路由
const commentRouter = require('./comment/comment.router')
// 引入爬虫路由
const newsSpiderRouter = require('./spider/news_spider.router')
// 创建实例
const router = new Router()


// 使用子路由
router.use(userRouter.routes())
router.use(avatarUpload.routes())
router.use(userManage.routes())
router.use(blogRouter.routes())
router.use(categorizeRouter.routes())
router.use(dataEchartsRouter.routes())
router.use(commentRouter.routes())
router.use(newsSpiderRouter.routes())
module.exports = router